<?php
session_start();
error_reporting(E_ALL ^ E_WARNING ^E_NOTICE);
 echo"<head>
        <link rel='Stylesheet' type='text/css' href='style.css' />
        <meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
        <title></title>
    </head>"; 
include 'functions.php';
connect();
select_db('kapek');

$pytaj='UPDATE books SET tytul="'.$_POST['tytul'].'",autor="'.$_POST['autor'].'",wydawnictwo="'.$_POST['wydawnictwo'].'",isbn="'.$_POST['isbn'].'",strony="'.$_POST['strony'].'",rok="'.$_POST['rok'].'",opis="'.$_POST['opis'].'",data="'.$_POST['data'].'",stan="'.$_POST['stan'].'",cena="'.$_POST['cena'].'",kategoria="'.$_POST['kategoria'].'",oprawa="'.$_POST['oprawa'].'",ilosc="'.$_POST['ilosc'].'",promocja="'.$_POST['promocja'].'" WHERE id="'.$_POST['id'].'"';
$result=mysql_query($pytaj) or die (" nie ma tabeli: ".mysql_error());

$skad=$_SERVER["HTTP_REFERER"];
header('location:'.$skad.''); //to redirect back to "index.php" after logging out
exit();
?>
